<template>
	<view class="router-view container">
		<view class="fz-15 bold mt-10">选择你需要查看的附件</view>

		<view class="file-list">
			<view class="item shadow p-20 mt-20 pointer" v-for="(item, index) in files" :key="index" @tap="previewFile(item)">
				{{ item.name }}
			</view>
		</view>
	</view>
</template>

<script>
	export default {

		data() {
			return {
				files: [],
				imageTypes: ["jpg", "jpeg", "png", "gif"],
			};
		},

		onLoad() {
			this.files = uni.getStorageSync("currentFiles") || [];
		},

		methods: {
			/**
			 * 预览文件
			 */
			previewFile(item) {
				uni.navigateTo({
					url: `/pages/index/filesdetaile?url=${JSON.stringify(item)}`,
				});
			
			},
		},
	};
</script>

<style lang="scss" scoped></style>
